Control Definition IDs
The Mac OS 8.5 Control Manager defines the following new
control definition IDs. For details on other standard control definition IDs, see
Mac OS 8 Control Manager Reference
.
enum {
kControlEditTextInlineInputProc = 276,
kControlIconRefProc = 324,
kControlIconRefNoTrackProc = 325,
kControlCheckBoxAutoToggleProc = 371,
kControlRadioButtonAutoToggleProc = 372,
kControlScrollTextBoxProc = 432,
kControlScrollTextBoxAutoScrollProc = 433
};
Constant descriptions
-
kControlEditTextInlineInputProc
-
Identifies the inline input variant of the editable text control (
'CDEF'
resource ID 17), which supports 2-byte script systems. This variant cannot be combined with the password variant of the editable text box.
-
kControlIconRefProc
-
Identifies the variant of the icon control (
'CDEF'
resource ID 20) that supports all standard types of icon-based content. Note that you do not supply content for this control upon its creation with a call to the
NewControl
function. Rather, after the control's creation you can set or change its content at any time by passing the
SetControlData
function the kControlIconContentTag control data tag constant and a
ControlButtonContentInfo
structure containing any of the allowable data types. Supported data types for this icon control variant are specified with the following
ControlContentType
values:
kControlContentIconSuiteRes
,
kControlContentCIconRes
(uses a black-and-white
'ICON'
resource if the color resource isn't available),
kControlContentIconSuiteHandle
,
kControlContentCIconHandle
, and
kControlContentIconRef
. Note, too, that if you supply the
kControlContentIconRef
value, you must first use Icon Services functions to register your resources and generate
IconRef
values. see
Mac OS 8 Control Manager Reference
for a description of the
ControlButtonContentInfo
data type and the
ControlContentType
constants.
-
kControlIconRefNoTrackProc
-
Identifies the non-tracking variant of the icon control (
'CDEF'
resource ID 20) that supports all standard types of icon-based content. This control immediately returns
kControlIconPart
as the part code hit without tracking. Note that you do not supply content for this control upon its creation with a call to the
NewControl
function. Rather, after the control's creation you can set or change its content at any time by passing the
SetControlData
function the kControlIconContentTag control data tag constant and a
ControlButtonContentInfo
structure containing any of the allowable data types. Supported data types for this icon control variant are specified with the following
ControlContentType
values:
kControlContentIconSuiteRes
,
kControlContentCIconRes
(uses a black-and-white
'ICON'
resource if the color resource isn't available),
kControlContentIconSuiteHandle
,
kControlContentCIconHandle
, and
kControlContentIconRef
. Note, too, that if you supply the
kControlContentIconRef
value, you must first use Icon Services functions to register your resources and generate
IconRef
values. see
Mac OS 8 Control Manager Reference
for a description of the
ControlButtonContentInfo
data type and the
ControlContentType
constants.
-
kControlCheckBoxAutoToggleProc
-
Identifies a checkbox control (
'CDEF'
resource ID 23) that automatically changes among its various states (on, off, mixed) in response to user actions. Your application must only call the function
GetControl32BitValue
to get the checkbox's new state--there is no need to manually change the control's value after tracking successfully.
-
kControlRadioButtonAutoToggleProc
-
Identifies a radio button control (
'CDEF'
resource ID 23) that automatically changes among its various states (on, off, mixed) in response to user actions. Your application must only call the function
GetControl32BitValue
to get the radio button's new state--there is no need to manually change the control's value after tracking successfully.
-
kControlScrollTextBoxProc
-
Identifies the standard variant of the scrolling text box (
'CDEF'
resource ID 27), which contains a scroll bar. Your application can use the
kControlScrollTextBoxProc
ID to create a scrolling box of non-editable text, such as is used for an "About" box. You must pass the
NewControl
function the ID of a
'TEXT'
resource--and, optionally, a
'styl'
resource--to be used for the initial value of the control. The minimum and maximum values are reserved for the
kControlScrollTextBoxProc
variant and should be set to 0.
-
kControlScrollTextBoxAutoScrollProc
-
Identifies the auto-scrolling variant of the scrolling text box (
'CDEF'
resource ID 27); this variant does not contain a scroll bar. Your application can use the kControlScrollTextBoxAutoScrollProc ID to create a scrolling box of non-editable text, such as is used for an "About" box. You must pass the
NewControl
function the ID of a
'TEXT'
resource--and, optionally, a
'styl'
resource--to be used for the initial value of the control. For the minimum value of the control, pass a value equal to the delay, in ticks, before the control begins scrolling; this delay will also be used between when scrolling completes and when it begins again. For the maximum value of the control, pass a value equal to the delay, in ticks, between each unit of scrolling. The unit of scrolling for the auto-scrolling text box control is one pixel at a time, unless your application changes this value by calling the
SetControlData
function. Note that in order to advance the content of the text box--that is, to scroll the content--you must call the
IdleControls
function on a periodic basis, such as whenever you receive a null event.
© 1999 Apple Computer, Inc. — (Last Updated 20 Jan 99)